package com.hevs.samplewebapp.client.screenComponents;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;

/**
 * 
 * @author Thomas Rouvinez
 * Date: 07.05.2012
 * 
 * Goal: create a screen to give main information to the administrator,
 * like an on-board manual(RT*M).
 *
 */
public class ScreenComponentAdminInformation extends Composite{

	/**
	 * Main panel layout.
	 */
	private HorizontalPanel hPanel = new HorizontalPanel();
	
	/**
	 * Flextable that contains the whole information text.
	 */
	private FlexTable info = new FlexTable();
	
	/**
	 * Image on the side of the information(nurse.png).
	 */
	private Image nurse = new Image("nurseSide.png");

	/**
	 * Constructor for the administrator manual.
	 */
	public ScreenComponentAdminInformation(){
		
		// Fill in the information.
		info.setWidget(0, 0, new HTML("<h2>Administration information</h2>"));

		info.setWidget(2, 0, new HTML("This panel has been created for the use only of an administrator.<br>" +
				"As an administrator you should not temper with the data unless a <br>" +
				"user or a doctor has specifically asked for it"));
		
		info.setWidget(3, 0, new HTML("<h2>Warning</h2>"
				+ "<ul><li>Access to, and use of, this site and the content thereof is at the risk of the user.</li>" +
				"<li>You are granted a non-transferable, non-exclusive license to use this service</li>" +
				"<li>Do not do anything which could reasonably be expected to damage, disable,<br> overburden, or materially impair the " +
				"service or this website generally</li>" +
				"<li>The account holder is ultimately responsible for administering and safeguarding<br> any passwords created to " +
				"control access to the users' accounts. Please keep any password issued to you secure.</li></ul>"));
		
		
		// Rig the size of the image.
		nurse.setWidth("400px");
		nurse.setHeight("350px");
		
		// Set the layout.
		hPanel.add(info);
		hPanel.add(nurse);
		
		// Init the widget
		initWidget(hPanel);
	}
}


